import request from "@/utils/request";

// 获取车型信息列表
export function getCarModelsList(params) {
  return request({
    url: "/truckType/page",
    params,
  });
}

// 新增车辆类型
export function addTruckType(data) {
  return request({
    url: "/truckType",
    method: "post",
    data,
  });
}
// 删除车辆类型
export function delTruckType(id) {
  return request({
    url: `/truckType/${id}`,
    method: "delete",
  });
}
// 修改车辆类型
export function editTruckType(data) {
  return request({
    url: `/truckType/${data.id}`,
    method: "put",
    data,
  });
}
// ______________________车辆页面______________________________
// 获取车辆分页数据
export function getCarList(params) {
  return request({
    url: "/truck/page",
    params,
  });
}
// 新增车辆
export function addTruck(data) {
  return request({
    url: "/truck",
    method: "post",
    data,
  });
}
